'use strict';

const Service = require('egg').Service;

class HomeService extends Service {
    async login(username,password) {
        return await this.app.mysql.query('select * from userlist where username=? and password=?',[username,password])
    }
    async menuList(role_id){
        return await this.app.mysql.query(`select resource_route,resource_name from resourcelist where power like '%${role_id}%'`)
    }
}

module.exports = HomeService;
